const express=require('express')
const {add_cate_schema,delete_cate_schema}=require('../ruls/article')
const expressJoi = require('@escook/express-joi')
const router=express.Router()
//获取文章的分类列表接口
// 导入文章分类的路由处理函数模块
const artcatehandler = require('../router-heard/artcate')
router.get('/cates',artcatehandler.getArticleCates)
//新增文章分类接口
router.post('/addcates',artcatehandler.addarticle)
//删除文章的接口
router.get('/deletecate/:id',expressJoi(delete_cate_schema),artcatehandler.deletecateid)
//获取文章的数据
router.get('/cates/:id', artcatehandler.getArtCateById)
//跟新文章分类数据
router.post('/updatecate', artcatehandler.updateCateById)
module.exports=router

